// PGLBoxPlot.h: interface for the CPGLBoxPlot class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PGLBOXPLOT_H__E2E58B62_C691_4059_88AA_C4513549E356__INCLUDED_)
#define AFX_PGLBOXPLOT_H__E2E58B62_C691_4059_88AA_C4513549E356__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <pgl/core/PGLLine.h>

class CPGLBoxPlot : public CPGLLine  
{
PGL_DECLARE_DYNCREATE(CPGLBoxPlot);
public:

	//! Rendering options
	enum EOption
	{
		OptionWhiskers	=	0x0001,
		OptionNotch		=	0x0002,
	};

	//! \name Constructors
	//@{
	//! Default constructor
	CPGLBoxPlot();
	virtual ~CPGLBoxPlot();
	//@}


	//!\name Setters and getters
	//@{
	//! Sets the box width in pixels
	void SetBoxWidth( float fBoxWidth )	;
	//! returns the box width
	float GetBoxWidth() const;
	//! Sets the data
	void SetData( CPGLDataPtr pData, size_t stColumnSize );
	//! returns the data
	CPGLDataPtr GetData() const;
	//! Clears the data
	void ClearData();
	//! returns the column size			
	size_t GetColumnSize() const;
	//! returns the number of columns
	size_t GetColumnCount() const;
	//@}

	void GetUnionExtent(gfxinterface::CGfxInterface& gfx, CPGLRectD& rExtent);
	void UpdateExtent(gfxinterface::CGfxInterface& gfx);

	//! \name Serialization and debugging
	//@{
	//! Serialization
	void SerializeXML(CPGLArchive& ar);
	#ifdef _DEBUG
		//! MFC Dump
	    virtual void Dump( CDumpContext& dc ) const;
		//! MFC AssertValid
	    virtual void AssertValid() const;   
	#endif
	//@}
protected:
		//! \name Virtual functions override
	//@{
	virtual void PlotArrowsGfx(gfxinterface::CGfxInterface& gfx);
	virtual void PlotLineStripGfx(gfxinterface::CGfxInterface& gfx);
	virtual void PlotPointStripGfx(gfxinterface::CGfxInterface& gfx);
	//@}

	//! \name Attributes
	//@{
	//! box width (in pixels)
	float m_fBoxWidth;
	//! Column size
	size_t m_stColumnSize;
	//! data object
	CPGLDataPtr m_pData;
	//@}
};

PGL_DECLARE_SMART_PTR( CPGLBoxPlot );

#endif // !defined(AFX_PGLBOXPLOT_H__E2E58B62_C691_4059_88AA_C4513549E356__INCLUDED_)
